#include <iostream>

using namespace std;
class Fraction {
public:
	double numerator;
	double denominator;
	
	Fraction(double n,double d){
		this->numerator = n;
		this->denominator = d;
	}
	Fraction(){}
	
	Fraction& operator+(Fraction& R){
		Fraction temp;
		temp.numerator = R.numerator + this->numerator;
		temp.denominator = R.denominator + this->denominator;
		
		return temp;
	}
	
	operator double(){
		return this->numerator / this->denominator;
	}
};


ostream& operator<<(ostream& cout, Fraction& R)
{
	cout << R.numerator << " / " << R.denominator << " = " << R.numerator / R.denominator;
	return cout;
}


int main( ) {
	Fraction R1(1, 2), R2(2, 3), R3;
	
	R3 = R1 + R2;
	double number = R3;
	cout << R3 << endl;
	cout << number << endl;
	return 0;
}